﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data;
using System.Data.SqlClient;
using IQKS.AWP.BusinessObject;

namespace IQKS.AWP.DataAccessLayer
{
    public class CandidateBriefDetailDAL
    {

       
        public DataSet  GetCandidateBriefByCandidateID(params object[] param)
        {
            DataSet objDs;

            try
            {
                objDs = DataUtils.ExecuteDataset("Usp_GetCandidateBriefByCandidateID", param);

            }
            catch (Exception exception)
            {
                throw new ApplicationException(exception.Message);
            }
            return objDs;
        }
        public DataSet GetCandidateCalendarUpdateByAssessorFlg(params object[] param)
        {
            DataSet objDs;

            try
            {
                objDs = DataUtils.ExecuteDataset("Usp_GetCandidateCalendarUpdateByAssessorFlg", param);

            }
            catch (Exception exception)
            {
                throw new ApplicationException(exception.Message);
            }
            return objDs;
        }

        public DataSet GetGDPartnerValidation(params object[] param)
        {
            DataSet objDs;

            try
            {
                objDs = DataUtils.ExecuteDataset("Usp_GetCandidatePartner", param);

            }
            catch (Exception exception)
            {
                throw new ApplicationException(exception.Message);
            }
            return objDs;
        }
        
        public DataSet GetAssessorAvailability(params object[] param)
        {
            DataSet objDs;

            try
            {
                objDs = DataUtils.ExecuteDataset("Usp_GetAssessorAvailability", param);

            }
            catch (Exception exception)
            {
                throw new ApplicationException(exception.Message);
            }
            return objDs;
        }

        public DataSet GetCandidateBriefDetailByCandidateID(params object[] param)
        {
            DataSet objDs;

            try
            {
                objDs = DataUtils.ExecuteDataset("Usp_GetCandidateBriefDetailByCandidateID", param);

            }
            catch (Exception exception)
            {
                throw new ApplicationException(exception.Message);
            }
            return objDs;
        }

        public DataSet GetCandidateBriefDocumentByDocumentType(params object[] param)
        {
            DataSet objDs;

            try
            {
                objDs = DataUtils.ExecuteDataset("Usp_GetCandidateBriefDocumentByDocumentType", param);

            }
            catch (Exception exception)
            {
                throw new ApplicationException(exception.Message);
            }
            return objDs;
        }

        public object SetCandidateBriefByStatusID(params object[] param)
        {
            try
            {
                return DataUtils.ExecuteScalar("Usp_SetCandidateBriefByStatusID", param);
            }
            catch (Exception ex)
            {
                throw new ApplicationException(ex.Message);
            }
        }
        public object SetCandidateBriefByStatusIDPreFinish(params object[] param)
        {
            try
            {
                return DataUtils.ExecuteScalar("Usp_SetCandidateBriefByStatusIDForPreFinish", param);
            }
            catch (Exception ex)
            {
                throw new ApplicationException(ex.Message);
            }
        }
        
        public object SetCandidateBriefDocument(params object[] param)
        {
            try
            {
                return DataUtils.ExecuteScalar("Usp_SetCandidateBriefDocument", param);
            }
            catch (Exception ex)
            {
                throw new ApplicationException(ex.Message);
            }
        }

        public object SetDeleteCandidateBriefDocument(params object[] param)
        {
            try
            {
                return DataUtils.ExecuteScalar("Usp_SetDeleteCandidateBriefDocument", param);
            }
            catch (Exception ex)
            {
                throw new ApplicationException(ex.Message);
            }
        }

        public object SetCandidateGroupDiscussionGuide(params object[] param)
        {
            try
            {
                return DataUtils.ExecuteScalar("Usp_SetCandidateGroupDiscussionGuide", param);
            }
            catch (Exception ex)
            {
                throw new ApplicationException(ex.Message);
            }
        }


        public object SetCandidateMoreComments(params object[] param)
        {
            try
            {
                return DataUtils.ExecuteScalar("Usp_SetCandidateMoreComments", param);
            }
            catch (Exception ex)
            {
                throw new ApplicationException(ex.Message);
            }
        }

        public object SetCandidateGroupDiscussion(params object[] param)
        {

            try
            {
                return DataUtils.ExecuteScalar("Usp_SetCandidateGroupDiscussion", param);

            }
            catch (Exception exception)
            {
                throw new ApplicationException(exception.Message);
            }

        }
        public object SetAssessorCandidateGroupDiscussion(params object[] param)
        {

            try
            {
                return DataUtils.ExecuteScalar("Usp_SetAssessorCandidateGroupDiscussion", param);

            }
            catch (Exception exception)
            {
                throw new ApplicationException(exception.Message);
            }

        }
        public DataSet GetCandidateGroupDiscussion(params object[] param)
        {
            DataSet objDs;

            try
            {
                objDs = DataUtils.ExecuteDataset("Usp_GetCandidateGroupDiscussion", param);

            }
            catch (Exception exception)
            {
                throw new ApplicationException(exception.Message);
            }
            return objDs;
        }
        public DataSet GetAssessorCalendarUpdateLog(params object[] param)
        {
            DataSet objDs;

            try
            {
                objDs = DataUtils.ExecuteDataset("Usp_GetAssessorCalendarUpdateLog", param);

            }
            catch (Exception exception)
            {
                throw new ApplicationException(exception.Message);
            }
            return objDs;
        }

        public DataSet GetCandidateName(params object[] param)
        {
            DataSet objDs;

            try
            {
                objDs = DataUtils.ExecuteDataset("Usp_GetCandidateName",param);

            }
            catch (Exception exception)
            {
                throw new ApplicationException(exception.Message);
            }
            return objDs;
        }
        
    }
}
